{% extends "base.html" %}

{% block body%}
	<h1>Index Page</h1>
	<!-- <div>
		{% load staticfiles %}
		<img src="{% static "img/2.jpg" %}">
	</div>
	-->

<!-- 查单词 -->
	<div id="word">
	<form action="/word/search" method="get">
		<strong>Search Word</strong><br />
		<input type="text" name="search_word" required="required" placeholder="Please Enter a Word" /><br />
		<input class="submit" type="submit" name="submit" values="Search" />
		{% load staticfiles %}
		<olnk href="{% static "css/test.css" %}" type="text/css" rel="stylesheet">
	</form>
	</div>

<!-- 查课文 -->
	<div id="text">
	<label>
	<form action="../searchtext" method="get">
		<strong>Search Text</strong><br/>
		{% if search_error %}
		<font color="red">* {{search_error}}</font><br />
		{% endif %}
		<input type="search" name="search" placeholder="Title or Para or Author" /><br />
		<input type="radio" name="choice" value="title" checked="checked"/>Title
		<input type="radio" name="choice" value="paragraph" />Paragraph
		<input type="radio" name="choice" value="author" />Author<br />
		<input class="submit" type="submit" name="submit" value="Submit" /><br />
	</form>
	</label>
	</div>

<!-- 课文 -->
	{% for text in texts %} 
	<p >
	<form action="../updatetext" method="post">
		
		<div class="column1of3">
			<ul>
			<ol>{{text.book.name.title}}</ol>
			<ol>{{text.book.author}}</ol>
			<ol>{{text.unit.unit.capitaolze }}</ol>
			<ol id="title">{{text.unit.text_title.title }}</ol>
			<ol>{{text.unit.text_author}}</ol>
			<ol>{{text.para}}&nbsp&nbsp<a href="../updatetext/{{text.id}}">编辑</a> </ol>
			<ol>{{text.add_time}}</ol>
			</ul>
		</div>

		<div class="column2of3">
			{{text.para_text|escape}}
		</div>

		<div class="column3of3">
			{{text.para_translation|escape}}
		</div>

	</form>
	</p>
	{% endfor %}

{% endblock %}
